@REM 这个命令定义了一个名为 file_path 的变量
@REM 注意IF else 和括号 条件间有一个空格！
set MSVS=0

IF "%MSVS%" =="1" (
set "dir_path=build1"
) else (
set "dir_path=build"    
)

IF EXIST %dir_path% (
    echo "Directory exist."
) else (
    echo "Directory does not exist."
    mkdir %dir_path%
)
cd %dir_path%
del ./*

IF "%MSVS%" =="1" (
cmake  ..
) else (
cmake -G "MinGW Makefiles" .. 
)
cmake --build .
IF "%MSVS%" =="1" (
copy "/Debug/main.exe" "./../../../Demo/main.exe"
) else (
copy "main.exe" "./../../../Demo/main.exe"
)



